#!/usr/bin/env perl

use utf8;
use strict;

sub total{
	my($sum);
	foreach(@_){
		$sum += $_;
	}
	return $sum;
}

my $one_thousand_sum = &total(1..1000);

print "The total of 1 .. 1000 is $one_thousand_sum.\n";
